<?php

namespace App\Modules\Bankcard;

use App\Modules\AdapterApi;
use App\Services\Bankcard\BankcardIndex;

/**
 * 银行卡应用层
 * Class Bankcard
 * @package App\Modules\Bankcard
 */
class Bankcard extends AdapterApi
{
    /*后台 - 获取银行卡列表（分页数据）*/
    public function cardList()
    {
        $data = pick_array($this->postData,['page', 'listRows', 'status', 'token', 'keywords']);

        return BankcardIndex::ApiBankcard()->cardList($data);
    }

    /*后台 - 删除银行卡*/
    public function AdminDelCard(): array
    {
        $data = pick_array($this->postData,['id','token']);

        return BankcardIndex::ApiBankcard()->AdminDelCard($data);
    }

    /*后台 - 审核银行卡*/
    public function audit(): array
    {
        $data = pick_array($this->postData,['id', 'status', 'token']);

        return BankcardIndex::ApiBankcard()->audit($data);
    }

}